package com.shenmazong.serverwebpoem.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.shenmazong.serverwebpoem.pojo.TbPoetry;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @author 田不平
 * @project server-web-poem
 * @date 2020/3/23 2:59 PM
 * http://www.shenmazong.com
 */
public interface TbPoetryService {
    TbPoetry getPoetryByTitle(String title);
    TbPoetry getPoetryById(Integer id);
    List<TbPoetry> getPoetry(TbPoetry poetry);
    void initPoetry(TbPoetry poetry);
    void addPoetry(TbPoetry poetry);
    void delPoetry(Integer id);
    void setPoetry(TbPoetry poetry);
    List<TbPoetry> getRandList(Integer num);
    List<TbPoetry> getListByAuthorId(Integer authorId);
    IPage<TbPoetry> getListByPage(Integer pageCurrent, Integer pageSize);
    IPage<TbPoetry> getListByAuthorId(Integer authorId, Integer pageCurrent, Integer pageSize);

    IPage<Map<String,Object>> getMapPoetryByPage(Integer pageCurrent, Integer pageSize);
    IPage<Map<String,Object>> getMapPoetry4AuthorByPage(Integer authorId, Integer pageCurrent, Integer pageSize);
    IPage<Map<String,Object>> getMapPoetry4ClickByPage(Integer pageCurrent, Integer pageSize);
    IPage<TbPoetry> getList4NotInElastic(Integer pageCurrent, Integer pageSize);

    // 获取没有放入ES的数据
    List<TbPoetry> getList4EsIsNULL();

}
